package com.example.joke.custom.listview

import android.widget.ArrayAdapter
import com.example.joke.base.navigationbar.AbsNavigationBar
import com.example.joke.databinding.ActivityScrollListViewBinding
import com.example.joke.frame.BaseSkinActivity
import com.example.joke.frame.DefaultNavigationBar


class ScrollListViewActivity : BaseSkinActivity<ActivityScrollListViewBinding>() {

    private val list = listOf("Apple", "Banana", "Orange", "Watermelon",
        "Pear", "Grape", "Pineapple", "Strawberry", "Cherry", "Mango",
        "Apple", "Banana", "Orange", "Watermelon", "Pear", "Grape",
        "Pineapple", "Strawberry", "Cherry", "Mango")

    override fun setListener() {
    }

    override fun initData() {
        val adapter: ArrayAdapter<String> = ArrayAdapter<String>(
            this@ScrollListViewActivity,
            android.R.layout.simple_list_item_1,
            list
        )
        binding.lv.adapter = adapter
        binding.lv1.adapter = adapter
    }

    override fun initTitle() {
        DefaultNavigationBar.Builder(this)
            .setTitle("sv嵌套listview显示不全")
            .builder<AbsNavigationBar.Builder.AbsNavigationParams>()
    }

    override fun getBinding1(): ActivityScrollListViewBinding {
        return ActivityScrollListViewBinding.inflate(layoutInflater)
    }
}